#include<bits/stdc++.h>
using namespace std;
#define int long long

int a[105];

signed main() {
	int n;
	cin >> n;
	for (int i = 1; i <= n; i++) {
		cin >> a[i];
		int ans = 0;
		for (int j = 1; j < i; j++) {
			if (a[j] < a[i])
				ans++;
		}
		cout << ans << " ";
	}
	return 0;
}
